using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DefenseTools._GriddedReferenceGraphic
{
    /// <summary>
    /// <para>Number Features</para>
    /// <para>Adds a sequential number to a new or existing field of a set of input features.</para>
    /// <para>将序列号添加到一组输入要素的新字段或现有字段。</para>
    /// </summary>    
    [DisplayName("Number Features")]
    public class NumberFeatures : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public NumberFeatures()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The input features to number.</para>
        /// <para>数字的输入要素。</para>
        /// </param>
        /// <param name="_field_to_number">
        /// <para>Field to Number (Existing or New)</para>
        /// <para>The input field to number. The field can be an existing short, long, or text field, or a new field.</para>
        /// <para>数字的输入字段。该字段可以是现有的短字段、长字段或文本字段，也可以是新字段。</para>
        /// </param>
        public NumberFeatures(object _in_features, object _field_to_number)
        {
            this._in_features = _in_features;
            this._field_to_number = _field_to_number;
        }
        public override string ToolboxName => "Defense Tools";

        public override string ToolName => "Number Features";

        public override string CallName => "defense.NumberFeatures";

        public override List<string> AcceptEnvironments => ["extent", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_features, _field_to_number, _in_area, _spatial_sort_method.GetGPValue(), _new_field_type.GetGPValue(), _out_feature_class];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The input features to number.</para>
        /// <para>数字的输入要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Field to Number (Existing or New)</para>
        /// <para>The input field to number. The field can be an existing short, long, or text field, or a new field.</para>
        /// <para>数字的输入字段。该字段可以是现有的短字段、长字段或文本字段，也可以是新字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Field to Number (Existing or New)")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _field_to_number { get; set; }


        /// <summary>
        /// <para>Input Area to Number</para>
        /// <para>The area that will limit the features to number; only features within this area will be numbered.</para>
        /// <para>将要素限制为数字的区域;只有此区域内的要素才会被编号。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Area to Number")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _in_area { get; set; } = null;


        /// <summary>
        /// <para>Spatial Sort Method</para>
        /// <para><xdoc>
        ///   <para>Specifies how features will be spatially sorted for the purpose of numbering. Features are not reordered in the table.</para>
        ///   <bulletList>
        ///     <bullet_item>Upper right—Sorting starts at the upper right corner. This is the default.</bullet_item><para/>
        ///     <bullet_item>Upper left—Sorting starts at the upper left corner.</bullet_item><para/>
        ///     <bullet_item>Lower right—Sorting starts at the lower right corner.</bullet_item><para/>
        ///     <bullet_item>Lower left—Sorting starts at the lower left corner.</bullet_item><para/>
        ///     <bullet_item>Peano curve—Sorting uses a space filling curve algorithm, also known as a Peano curve.</bullet_item><para/>
        ///     <bullet_item>None—A spatial sort will not be used. The same order as the feature class will be used.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何对要素进行空间排序以进行编号。要素不会在表中重新排序。</para>
        ///   <bulletList>
        ///     <bullet_item>右上角 - 从右上角开始排序。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>左上角 - 从左上角开始排序。</bullet_item><para/>
        ///     <bullet_item>右下角 - 从右下角开始排序。</bullet_item><para/>
        ///     <bullet_item>左下角 - 从左下角开始排序。</bullet_item><para/>
        ///     <bullet_item>皮亚诺曲线 - 排序使用空间填充曲线算法，也称为皮亚诺曲线。</bullet_item><para/>
        ///     <bullet_item>无—不使用空间排序。将使用与要素类相同的顺序。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Spatial Sort Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _spatial_sort_method_value _spatial_sort_method { get; set; } = _spatial_sort_method_value._UR;

        public enum _spatial_sort_method_value
        {
            /// <summary>
            /// <para>Upper right</para>
            /// <para>Upper right—Sorting starts at the upper right corner. This is the default.</para>
            /// <para>右上角 - 从右上角开始排序。这是默认设置。</para>
            /// </summary>
            [Description("Upper right")]
            [GPEnumValue("UR")]
            _UR,

            /// <summary>
            /// <para>Upper left</para>
            /// <para>Upper left—Sorting starts at the upper left corner.</para>
            /// <para>左上角 - 从左上角开始排序。</para>
            /// </summary>
            [Description("Upper left")]
            [GPEnumValue("UL")]
            _UL,

            /// <summary>
            /// <para>Lower right</para>
            /// <para>Lower right—Sorting starts at the lower right corner.</para>
            /// <para>右下角 - 从右下角开始排序。</para>
            /// </summary>
            [Description("Lower right")]
            [GPEnumValue("LR")]
            _LR,

            /// <summary>
            /// <para>Lower left</para>
            /// <para>Lower left—Sorting starts at the lower left corner.</para>
            /// <para>左下角 - 从左下角开始排序。</para>
            /// </summary>
            [Description("Lower left")]
            [GPEnumValue("LL")]
            _LL,

            /// <summary>
            /// <para>Peano curve</para>
            /// <para>Peano curve—Sorting uses a space filling curve algorithm, also known as a Peano curve.</para>
            /// <para>皮亚诺曲线 - 排序使用空间填充曲线算法，也称为皮亚诺曲线。</para>
            /// </summary>
            [Description("Peano curve")]
            [GPEnumValue("PEANO")]
            _PEANO,

            /// <summary>
            /// <para>None</para>
            /// <para>None—A spatial sort will not be used. The same order as the feature class will be used.</para>
            /// <para>无—不使用空间排序。将使用与要素类相同的顺序。</para>
            /// </summary>
            [Description("None")]
            [GPEnumValue("NONE")]
            _NONE,

        }

        /// <summary>
        /// <para>Field Type For New Field</para>
        /// <para><xdoc>
        ///   <para>Specifies the field type of the new field. This parameter is only used when the field name does not exist in the input table.</para>
        ///   <bulletList>
        ///     <bullet_item>Short—The field will be of short type. This is the default.</bullet_item><para/>
        ///     <bullet_item>Long—The field will be of long type.</bullet_item><para/>
        ///     <bullet_item>Text—The field will be of text type.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定新字段的字段类型。仅当输入表中不存在字段名称时，才使用此参数。</para>
        ///   <bulletList>
        ///     <bullet_item>短 - 字段的类型为短类型。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>Long—字段的类型为 long。</bullet_item><para/>
        ///     <bullet_item>文本 - 字段将为文本类型。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Field Type For New Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _new_field_type_value _new_field_type { get; set; } = _new_field_type_value._SHORT;

        public enum _new_field_type_value
        {
            /// <summary>
            /// <para>Short</para>
            /// <para>Short—The field will be of short type. This is the default.</para>
            /// <para>短 - 字段的类型为短类型。这是默认设置。</para>
            /// </summary>
            [Description("Short")]
            [GPEnumValue("SHORT")]
            _SHORT,

            /// <summary>
            /// <para>Long</para>
            /// <para>Long—The field will be of long type.</para>
            /// <para>Long—字段的类型为 long。</para>
            /// </summary>
            [Description("Long")]
            [GPEnumValue("LONG")]
            _LONG,

            /// <summary>
            /// <para>Text</para>
            /// <para>Text—The field will be of text type.</para>
            /// <para>文本 - 字段将为文本类型。</para>
            /// </summary>
            [Description("Text")]
            [GPEnumValue("TEXT")]
            _TEXT,

        }

        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_feature_class { get; set; }


        public NumberFeatures SetEnv(object extent = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(extent: extent, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}